﻿using System;
using System.Collections.Generic;
using Abs.Core.DAL.EntityFramework;
using Abs.Core.Models.Blog;

namespace Abs.Core.DAL.SetUpDatabase
{
    internal partial class AbsInitializer
    {
        internal void InitializeComments(AbsContext absContext)
        {
            var comments = new List<Comment>
                           {
                               new Comment
                               {
                                   UserEmail = "carlos.solis@abs.com",
                                   PostId = 1,
                                   ContentMessage = "I like it. Please add Sport Category.",
                                   Date = DateTime.Now.AddMinutes(20)
                               },
                               new Comment
                               {
                                   UserEmail = "andrew.van.de.kamp@abs.com",
                                   PostId = 1,
                                   ContentMessage = "@Carlos +1",
                                   Date = DateTime.Now.AddMinutes(30.5)
                               },
                               new Comment
                               {
                                   UserEmail = "marcia.cross@abs.com",
                                   PostId = 1,
                                   ContentMessage =
                                       "Great job guys. It would be nicer if there is a special place for suggesting new features.",
                                   Date = DateTime.Now.AddHours(1.2)
                               },
                               new Comment
                               {
                                   UserEmail = "porter.scavo@abs.com",
                                   PostId = 1,
                                   ContentMessage =
                                       "Have tried to post a new one for 5 times but it has not shown up yet. You guys should do more testing before you release it.",
                                   Date = DateTime.Now.AddHours(2.857)
                               }
                           };
            comments.ForEach(comment => absContext.Comments.Add(comment));
            absContext.SaveChanges();
        }//end of internal void InitializeComments(AbsContext absContext)
    }//end of internal partial class AbsInitializer
}//end of namespace ABS.DAL.SetUpDatabase